import { Logger } from './logger';

// const middleLogger = Logger(
//   'Middleware',
//   process.env.NODE_ENV !== 'development'
// );

const middleLogger = {
  //  can not use chalk in middleware :(
  info(...args: string[]) {
    if (process.env.NODE_ENV !== 'development') return;
    console.log(
      `[Middleware ${args[0]?.toUpperCase().replace(/middleware/i, '')}]`,
      ...args.slice(1)
    );
  },
};

export { middleLogger };
